package com.controller;

import com.service.PowerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
public class PowerController {
    @Autowired
    public PowerService powerService;

    @RequestMapping("/selectAllPowers")
    public Object selectAllPowers(){

        return powerService.selectAllPowers();
    }

    @RequestMapping("/selectPowers")
    public Object selectPowers(){
        return powerService.selectPowers();
    }

    @RequestMapping("/selectPowersByAdminId")
    public Object selectPowersByAdminId(long admin_id){
        return powerService.selectPowersByAdminId(admin_id);
    }


}
